/**
 * 
 */
package com.cdhospital.websitecontroller;

import java.util.List;

import com.cdhospital.websiteservice.GraduatemessageService;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

/**
 * @author 17994
 *
 */
public class WebsiteGraduatemessageController extends Controller {
   static GraduatemessageService service=new GraduatemessageService();
	public void index(){
		String title=null;
		Integer status=getParaToInt("status");
		if(status==null){
			status=1;
		}
		if(status==1){
			title="研究所概况";
		}
		else	if(status==2){
			title="所长寄语";
		}
		else if(status==3){
			title="研究所介绍";
		}
		else if(status==4){
			title="研究所荣誉";
		}
		else if(status==5){
			title="历史改革";
		}
		List<Record>  friendlinks=Db.findByCache("zone", "frindlink", "select * from friendlink order by flag asc");
		setAttr("graduate", service.findbyStatus(status));
		setAttr("firendlink", friendlinks);
		setAttr("title", title);
		setAttr("status", status);
		render("index.html");
	}

}
